{% set includeGuard = outputFilename | sanitize('[^0-9A-Za-z]') | upper + '_' %}
/**
 * \file
 * \brief Declarations of low-level SPI master drivers for SPIv1 in {{ board }} ({{ dictionary['chip']['compatible'][0] }} chip)
 *
 * \author Copyright (C) 2016-2019 Kamil Szczygiel https://distortec.com https://freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
 *
 * \warning
 * Automatically generated file - do not edit!
 */

#ifndef {{ includeGuard }}
#define {{ includeGuard }}

#include "distortos/distortosConfiguration.h"

namespace distortos
{

namespace chip
{

class SpiMasterLowLevelDmaBased;
class SpiMasterLowLevelInterruptBased;

/*---------------------------------------------------------------------------------------------------------------------+
| global objects
+---------------------------------------------------------------------------------------------------------------------*/
{% for key, spi in dictionary['SPIs'].items() if spi is mapping and 'ST,STM32-SPI-v1' in spi['compatible'] %}

#ifdef DISTORTOS_CHIP_{{ key | upper }}_ENABLE

/// SPI master low-level driver for {{ key }}
#ifdef DISTORTOS_CHIP_{{ key | upper }}_DMA_BASED
extern SpiMasterLowLevelDmaBased {{ key | lower }};
#else	// !def DISTORTOS_CHIP_{{ key | upper }}_DMA_BASED
extern SpiMasterLowLevelInterruptBased {{ key | lower }};
#endif	// !def DISTORTOS_CHIP_{{ key | upper }}_DMA_BASED

#endif	// def DISTORTOS_CHIP_{{ key | upper }}_ENABLE
{% endfor %}

}	// namespace chip

}	// namespace distortos

#endif	// {{ includeGuard }}
